Arm backend: Add experimental support for new TOSAQuantizer#18100
Arm backend: Add experimental support for new TOSAQuantizer#18100AdrianLundell wants to merge 6 commits intopytorch:mainfrom
Conversation
Allows initializing TOSA/EthosU/Vgf quantizers with use_composable_quantizer=True to use a new implementation of the quantizer following the Cortex-M. See pytorch#17701 for more details. - Creates a new temporary TOSAQuantizer API layer for switching between the two versions - Adds a TOSAQuantizationConfig encapturing TOSA-specific qspec requirements for certain ops. - Adds quantizer_support.py for defining what operators are supported by the quantizer. - Align mark_node_as_annotated in cortex-m backend to TOSAQuantizer behaviour. - Update quantizer reporter to handle TOSA qspecs as they are dynamically created. Signed-off-by: Adrian Lundell <adrian.lundell@arm.com> Change-Id: Icbca66ff86e6f78ffa1c8dcec55e17c25f97d8ca
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18100
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 3 Unrelated FailuresAs of commit 885a81b with merge base b836a57 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Signed-off-by: Adrian Lundell <adrian.lundell@arm.com> Change-Id: Id81e0c39d13a94a749206441fce60664c80a0af8
|
Hi @SS-JIA / @digantdesai this adds a file, do you want/need to check this? |
|
Fails unrelated |
|
|
||
| # Lazily import heavy quantizer classes to avoid circular imports with | ||
| # Cortex-M quantization configs. | ||
| _LAZY_EXPORTS = { |
There was a problem hiding this comment.
This is a workaround since the import situation is a bit messy with imports across the cortex-m and arm backend. The idea is to clean this up when things have stabilized, I didn't want to move things in this commit to make the diff cleaner, I hope this is OK.
|
I like the overall direction, and the Cortex-M quantizer reuse. Also the priority for the composition. One thing I would say is, add an e2e test with both Ethos and Cortex-M quantizers and run the test on FVP. |
- Spelling errors - Buck fixes - E2E model test on fvp with new quantizer Signed-off-by: Adrian Lundell <adrian.lundell@arm.com> Change-Id: I43dadbcec22b3b28c65a1c9708790881dd3868a2
|
I hope this is what you had in mind for the test @digantdesai, we have also run all tests internally with the new quantizer set to true sucessfully. The idea is that we can let you and others try this out and give feedback and then there should be minimal disruption as we flip the flag to True as default. |
Allows initializing TOSA/EthosU/Vgf quantizers with use_composable_quantizer=True to use a new implementation of the quantizer following the Cortex-M. See
#17701 for more details.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell